package com.lmscn.lms.api.controller;

import java.util.HashMap;
import java.util.Map;

import com.jfinal.core.Controller;
import com.lmscn.lms.api.model.CourseCount;
import com.lmscn.lms.api.util.JsonKit;
import com.lmscn.lms.commons.GlobalConst;

public class CourseCountController extends Controller {
	public void findCourseCountByCourseId(){
		Map<String, Object> dataMaps = new HashMap<String, Object>();
		Long courseId = getParaToLong("courseId");
		dataMaps.put("courseCount", CourseCount.dao.findByCourseId(courseId));
		renderJson(JsonKit.mapToJson(dataMaps, GlobalConst.DEFAULT_DEPTH));
	}
}
